/*
 * Powered By xTOOLs
 * Dev by tao.li8@pactera.com
 * Copyright ©2009-2018 pactera.com All rights reserved.
 *
 * Generated at Aug 5, 2020 5:48:14 PM
 */

package com.pactera.jep.service.yapin.coll.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.pactera.jep.orm.Operator;
import com.pactera.jep.orm.mybatis.entity.EntityFilter;
import com.pactera.jep.service.yapin.coll.vo.CoownerVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.pactera.jep.orm.mybatis.mapper.Mapper;
import com.pactera.jep.orm.mybatis.service.MyBatisCRUDService;

import com.pactera.jep.service.yapin.coll.mapper.CoownerMapper;
import com.pactera.jep.service.yapin.coll.service.CoownerService;
import com.pactera.jep.service.yapin.coll.model.Coowner;

import java.util.*;

/**
 * 服务层实现
 * @author YourName
 * @date Aug 5, 2020 5:48:14 PM
 */
@Service
@Transactional(readOnly = false)
public class CoownerServiceImpl extends MyBatisCRUDService<Coowner, String> implements CoownerService {

    Logger logger =  LoggerFactory.getLogger(getClass());

    @Autowired
    private CoownerMapper			coownerMapper;


    @Override
    public Mapper<Coowner, String> getMapper() {
         return coownerMapper;
    }

//    @Override
//    public Map<String, Object> getCoownerByCltId(String cltId){
//
//            CoownerVO coownerVO = new CoownerVO();
//            List<EntityFilter> list = new ArrayList<>();
//            list.add(new EntityFilter(Coowner.class, "cltId", Operator.EQ, cltId));
//            List<Coowner> coowners = coownerMapper.selectByFilter(list);
//            PageInfo<Coowner> pageInfo = new PageInfo<>(coowners);
//            List<Coowner> coownerList = pageInfo.getList();
//            PageHelper.startPage(coownerVO.getPageNum(),coownerVO.getPageSize());
//            Map<String, Object> result = new HashMap();
//            result.put("total",pageInfo.getTotal());
//            result.put("rows",coownerList);
//            return result;
//        }
}
